import java.util.Scanner;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/4/12
 * Time:21:00
 **/
public class Main2 {
    /**
     * 每日一题-倒置字符串
     *
     * @param args StringBuffer
     */
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        //根据空格切割
        String[] s = str.split(" ");
        String temp = "";
        for (int i = s.length - 1; i >= 0; i--) {
            temp = temp + s[i] + " ";
        }
        System.out.print(temp);
    }

}
